package com.ledi.guns.common.persistence.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

@TableName("t_sys_area")
public class Region extends Model<Region> {

	private static final long	serialVersionUID	= 1L;
	/**
	 * 主键
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	private String code;

	private String parentCode;

	private String name;

	public void setId(Long id) {

		this.id = id;
	}

	public void setCode(String code) {

		this.code = code;
	}

	public void setParentCode(String parentCode) {

		this.parentCode = parentCode;
	}

	public void setName(String name) {

		this.name = name;
	}

	public Long getId() {

		return id;
	}

	public String getCode() {

		return code;
	}

	public String getParentCode() {

		return parentCode;
	}

	public String getName() {

		return name;
	}

	@Override
	protected Serializable pkVal() {

		return id;
	}

	@Override public String toString() {

		return "Region{" +
				"id=" + id +
				", code='" + code + '\'' +
				", parentCode='" + parentCode + '\'' +
				", name='" + name + '\'' +
				'}';
	}
}
